package com.iias.communication.codec;


import com.iias.communication.domain.DecodeInfo;
import com.iias.communication.packet.PacketBody;

public abstract class AbstractCodec {

    public abstract DecodeInfo decodeInfo(byte[] in);


    public abstract boolean addPacketBody(int msgId,Class<? extends PacketBody> packetBodyClass);


    /**
     * 编码
     * @param packetBody
     * @return
     */
    public abstract byte[] encoding(int msgId,PacketBody packetBody);

}
